package gridy.node;

import gridy.fitness.FitnessCalculatorWorker;

import org.apache.tuscany.sca.host.embedded.SCADomain;

public class LaunchFitnessCalculatorWorker {
    public static void main(String[] args) throws Exception {
        
        System.out.println("Starting the FitnessCalculatorWorker...");

        SCADomain domain = SCADomain.newInstance("FitnessCalculatorWorker.composite");
        FitnessCalculatorWorker worker = domain.getService(FitnessCalculatorWorker.class, "FitnessCalculatorWorkerComponent");
        
        System.out.println("Press Enter to Exit...");
        System.in.read();
        worker.unregister();

        domain.close();
        System.out.println("Bye");
    }
}
